<?php declare(strict_types=1);
/**
 * @author      xianganyall <xianganyall@gmail.com>
 * @copyright   2023-2025 owner
 **/

namespace Srv\Apps\Apis\Common\DefCtl;

final class DefBalanceCategoryCtl extends DefAbstract
{
    private const TABLE_NAME                = 'def_balance_category';
    private const FIELD_ID                  = 'dbtc_id';
    private const FIELD_KEY                 = 'dbtc_key';
    private const FIELD_DECIMAL             = 'dbtc_decimal';
    private const FIELD_NAME                = 'dbtc_name';
    public const EXT_DECIMAL                = 'decimalNum';
    public const EXT_NAME                   = 'name';
    public const KEY_BALANCE_COIN           = 'balance_coin';
    public const KEY_BALANCE_RMB            = 'balance_rmb';

    /**
     * @return static
     * tag
     */
    public static function tag():self
    {
        $fieldExtList       = [
            self::EXT_DECIMAL   => self::FIELD_DECIMAL,
            self::EXT_NAME      => self::FIELD_NAME
        ];
        return parent::tag()->config(self::TABLE_NAME, self::FIELD_ID, self::FIELD_KEY, $fieldExtList);
    }
}